<div class="flow-alert "ng-switch="base.operation">
    <div class="flow-item-title wrap">
        <i class="fa fa-download"></i>
        <span ng-show="bulk">Alert updates</span>
        <span ng-show="!bulk">[{{base.object.source}}] {{base.object.title}}</span>
    </div>

    <div class="flow-item-updates wrap" ng-show="bulk">
        <div class="flow-item-bulk" ng-show="summary.alert.Creation">
            <ng-pluralize count="summary.alert.Creation" when="{'one': '{} new alert has been added', 'other': '{} new alerts have been added'}"></ng-pluralize>
        </div>
        <div class="flow-item-bulk" ng-show="summary.alert.Update">
            <ng-pluralize count="summary.alert.Update" when="{'one': '{} existing alert has been updated', 'other': '{} existing alerts have been updated'}"></ng-pluralize>
        </div>
        <div class="flow-item-bulk" ng-show="summary.alert.Delete">
            <ng-pluralize count="summary.alert.Delete" when="{'one': '{} existing alert has been permanently deleted', 'other': '{} existing alerts have been permanently deleted'}"></ng-pluralize>
        </div>
        <div>
            <a class="small" href ng-click="openState('app.alert-list')">See all</a>
        </div>
    </div>

    <div class="flow-item-updates wrap" ng-hide="bulk" ng-switch-default>
        <span ng-repeat="(k,v) in base.details"
            ng-switch="k"
            ng-if="['description', 'caseTemplate', 'title', 'follow', 'lastSyncDate'].indexOf(k) === -1">
            <div ng-switch-when="artifacts">
                {{k}}:
                <em>{{v.length}}</em>
            </div>
            <div ng-switch-when="severity">
                {{k}}: <severity active="false" value="v"></severity>
            </div>
            <div ng-switch-when="status">
                {{k}}: <span class="clickable label label-default" ng-class="{
                  'label-danger': v === 'New',
                  'label-warning': v === 'Update'}">{{::v}}</span>
            </div>
            <div ng-switch-when="case">
                {{k}}: <a href ui-sref="app.case.details({caseId: v})">{{v}}</a>
            </div>
            <div ng-switch-when="tags">
                {{k}}:
                <span ng-repeat="tag in v">
                    <span class="label label-primary">{{tag}}</span>
                </span>
                <span ng-if="v.length === 0">
                    <em>None</em>
                </span>
            </div>
            <div ng-switch-when="tlp">
                {{k}}: <tlp format="'static'" value="v"></tlp>
            </div>
            <div ng-switch-default>
                {{k}}:
                <em>{{v | limitTo: 250}}</em>
            </div>
        </span>
    </div>
</div>
